<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>3-2 Vue.use</title>
</head>
<body>
<div id="app" v-my-directive></div>
</body>
<script src="./js/vue.js"></script>
<script>
  let MyPlugin = {};
  MyPlugin.install = function (Vue, options) {
    console.log(options)
    Vue.directive('my-directive',{
      bind(el, binding) {
        el.style = 'width:100px;height:100px;background-color:#ccc';
      }
    })
  };
  Vue.use(MyPlugin,{someOption: true})
  new Vue({
    el:'#app'
  })
</script>
</html>